<template>
  <div class="guide-container">
    <!-- 使用封装的顶部导航组件 -->
    <MainHeader />
    
    <!-- 主要内容区 -->
    <div class="main-container">
      <!-- 使用封装的侧边菜单组件 -->
      <SideMenu />
      
      <!-- 右侧内容区 -->
      <div class="content">
        <!-- 使用教程部分 -->
        <h2 class="page-title">使用教程</h2>
        
        <!-- 视频教程卡片 -->
        <div class="video-tutorials">
          <div class="video-card">
            <div class="video-thumbnail">
              <div class="play-button">
                <i class="play-icon"></i>
              </div>
              <div class="duration">02:43</div>
            </div>
            <div class="video-title">企业/领英获客教程</div>
            <div class="video-action">
              <button class="action-button">点击了解</button>
            </div>
          </div>
          
          <div class="video-card">
            <div class="video-thumbnail">
              <div class="play-button">
                <i class="play-icon"></i>
              </div>
              <div class="duration">02:09</div>
            </div>
            <div class="video-title">广交会使用教程</div>
            <div class="video-action">
              <button class="action-button">点击了解</button>
            </div>
          </div>
          
          <!-- 海关数据视频教程 - 已注释掉 -->
          <!-- <div class="video-card">
            <div class="video-thumbnail">
              <div class="play-button">
                <i class="play-icon"></i>
              </div>
              <div class="duration">02:36</div>
            </div>
            <div class="video-title">海关数据使用教程</div>
            <div class="video-action">
              <button class="action-button">点击了解</button>
            </div>
          </div> -->
        </div>
        
        <div class="section-divider">
          <div class="section-header">
            <h3 class="section-title">快捷入口</h3>
            <button class="customize-button">自定义</button>
          </div>
          
          <div class="shortcut-grid">
            <div class="shortcut-item">
              <div class="shortcut-icon"></div>
              <div class="shortcut-name">企业搜索</div>
            </div>
            <div class="shortcut-item">
              <div class="shortcut-icon"></div>
              <div class="shortcut-name">广交会采购商</div>
            </div>
            <!-- 海关数据快捷入口 - 已注释掉 -->
            <!-- <div class="shortcut-item">
              <div class="shortcut-icon"></div>
              <div class="shortcut-name">海关数据</div>
            </div> -->
            <div class="shortcut-item">
              <div class="shortcut-icon"></div>
              <div class="shortcut-name">领英获客</div>
            </div>
            <div class="shortcut-item">
              <div class="shortcut-icon"></div>
              <div class="shortcut-name">地图搜客</div>
            </div>
            <div class="shortcut-item">
              <div class="shortcut-icon"></div>
              <div class="shortcut-name">社媒洞察</div>
            </div>
          </div>
        </div>
        
        <div class="section-divider">
          <div class="section-header">
            <h3 class="section-title">搜索记录</h3>
            <button class="view-more-button">查看更多</button>
          </div>
          
          <div class="search-history">
            <div class="history-item">
              <div class="history-icon"></div>
              <div class="history-content">
                <div class="history-title">领英获客</div>
                <div class="history-detail">
                  <span class="detail-label">关键词:</span>
                  <span class="detail-value">数据:</span>
                  <span class="detail-count">10000条</span>
                  <span class="detail-arrow">></span>
                </div>
                <div class="history-time">搜索时间: 2025-04-16 10:32:25</div>
              </div>
            </div>
            
            <div class="history-item">
              <div class="history-icon"></div>
              <div class="history-content">
                <div class="history-title">广交会</div>
                <div class="history-detail">
                  <span class="detail-label">关键词:</span>
                  <span class="detail-value">数据:</span>
                  <span class="detail-count">2525930条</span>
                  <span class="detail-arrow">></span>
                </div>
                <div class="history-time">搜索时间: 2025-04-15 12:10:08</div>
              </div>
            </div>
            
            <div class="history-item">
              <div class="history-icon"></div>
              <div class="history-content">
                <div class="history-title">企业</div>
                <div class="history-detail">
                  <span class="detail-label">关键词:</span>
                  <span class="detail-value">数据:</span>
                  <span class="detail-count">10000条</span>
                  <span class="detail-arrow">></span>
                </div>
                <div class="history-time">搜索时间: 2025-04-15 12:09:44</div>
              </div>
            </div>
            
            <div class="history-item">
              <div class="history-icon"></div>
              <div class="history-content">
                <div class="history-title">领英获客</div>
                <div class="history-detail">
                  <span class="detail-label">关键词:</span>
                  <span class="detail-value">数据:</span>
                  <span class="detail-count">10000条</span>
                  <span class="detail-arrow">></span>
                </div>
                <div class="history-time">搜索时间: 2025-04-15 12:09:32</div>
              </div>
            </div>
          </div>
        </div>
        
        <div class="section-divider">
          <div class="section-header">
            <h3 class="section-title">搜索次数</h3>
            <button class="view-more-button">查看更多</button>
          </div>
          
          <div class="search-stats">
            <div class="stat-item">
              <div class="stat-label">广交会</div>
              <div class="stat-bar-container">
                <div class="stat-bar" style="width: 50px;"></div>
                <div class="stat-value">4</div>
              </div>
            </div>
            
            <div class="stat-item">
              <div class="stat-label">领英获客</div>
              <div class="stat-bar-container">
                <div class="stat-bar" style="width: 75px;"></div>
                <div class="stat-value">6</div>
              </div>
            </div>
            
            <div class="stat-item">
              <div class="stat-label">企业</div>
              <div class="stat-bar-container">
                <div class="stat-bar" style="width: 100px;"></div>
                <div class="stat-value">8</div>
              </div>
            </div>
          </div>
        </div>
      </div>
      
      <!-- 右侧浮动按钮组 -->
      <div class="floating-buttons">
        <div class="float-button blue">
          <span>升</span>
        </div>
        <div class="float-button green">
          <span>视</span>
        </div>
        <div class="float-button orange">
          <span>客</span>
        </div>
        <div class="float-button red">
          <span>X</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import MainHeader from '@/components/MainHeader.vue'
import SideMenu from '@/components/SideMenu.vue'
</script>

<style scoped>
.guide-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f5f7fa;
}

.main-container {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

.content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.page-title {
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 20px 0;
  color: #333;
}

.video-tutorials {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.video-card {
  flex: 1;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.video-thumbnail {
  height: 150px;
  background-color: #1890ff;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: linear-gradient(45deg, #1890ff, #36c2ff);
  color: white;
  font-size: 18px;
  font-weight: bold;
}

.play-button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
}

.play-icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #ffffff;
  margin-left: 4px;
}

.duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: normal;
}

.video-title {
  padding: 15px;
  font-size: 16px;
  font-weight: 500;
  color: white;
  background-color: #1890ff;
}

.video-action {
  padding: 15px;
  display: flex;
  justify-content: center;
}

.action-button {
  background-color: #1890ff;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 6px 15px;
  cursor: pointer;
  font-size: 14px;
}

.section-divider {
  margin-bottom: 30px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.section-title {
  font-size: 18px;
  font-weight: 500;
  margin: 0;
  color: #333;
}

.customize-button, .view-more-button {
  background: none;
  border: none;
  color: #1890ff;
  cursor: pointer;
  font-size: 14px;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 15px;
}

.shortcut-item {
  background-color: white;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.shortcut-icon {
  width: 50px;
  height: 50px;
  background-color: #1890ff;
  border-radius: 8px;
  margin-bottom: 10px;
}

.shortcut-name {
  font-size: 14px;
  color: #333;
}

.search-history {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 15px;
}

.history-item {
  background-color: white;
  border-radius: 8px;
  padding: 15px;
  display: flex;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.history-icon {
  width: 50px;
  height: 50px;
  background-color: #1890ff;
  border-radius: 8px;
  margin-right: 15px;
}

.history-content {
  flex: 1;
}

.history-title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 5px;
  color: #333;
}

.history-detail {
  font-size: 14px;
  color: #666;
  margin-bottom: 5px;
}

.detail-label, .detail-value {
  margin-right: 5px;
}

.detail-count {
  color: #1890ff;
}

.detail-arrow {
  color: #ccc;
  margin-left: 5px;
}

.history-time {
  font-size: 12px;
  color: #999;
}

.search-stats {
  background-color: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-item {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.stat-item:last-child {
  margin-bottom: 0;
}

.stat-label {
  width: 100px;
  font-size: 14px;
  color: #333;
}

.stat-bar-container {
  flex: 1;
  display: flex;
  align-items: center;
}

.stat-bar {
  height: 16px;
  background-color: #1890ff;
  border-radius: 8px;
  margin-right: 10px;
}

.stat-value {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.floating-buttons {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.float-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.float-button.blue {
  background-color: #1890ff;
}

.float-button.green {
  background-color: #00c6ae;
}

.float-button.orange {
  background-color: #ffbb00;
}

.float-button.red {
  background-color: #ff3b30;
}
</style> 